package com.lizheng.yunservice.travel.service.impl;

import com.lizheng.yunservice.travel.doamin.vo.VtpAppExploreCategoryVo;
import com.lizheng.yunservice.travel.doamin.vo.VtpAppExploreVo;
import com.lizheng.yunservice.travel.mapper.VtpAppExploreMapper;
import com.lizheng.yunservice.travel.service.VtpExploreService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 虚游探索发现服务实现类
 */
@RequiredArgsConstructor
@Service
public class VtpExploreServiceImpl implements VtpExploreService {

    private final VtpAppExploreMapper exploreMapper;

    /**
     * 获取探索分类信息
     */
    @Override
    public List<VtpAppExploreCategoryVo> getExplore() {
        List<VtpAppExploreCategoryVo> list = (List<VtpAppExploreCategoryVo>) exploreMapper.selectExploreCategory();
        return list;
    }

    /**
     * 根据类别ID获取探索发现列表
     */
    @Override
    public List<VtpAppExploreVo> getExploreBYCategoryId(Long id) {
        List<VtpAppExploreVo> list = (List<VtpAppExploreVo>) exploreMapper.selectExploreBYCategoryId(id);
        return list;
    }

    /**
     * 根据探索ID获取探索发现详细信息
     */
    @Override
    public VtpAppExploreVo getExploreBYExpolreId(Long id) {
        return exploreMapper.selectExploreBYExploreId(id);
    }
}